using System;
using System.Xml;
using System.IO;
using UnityEngine;

namespace AssemblyCSharp
{
	public class XmlParser
	{	
		public XmlDocument xmlDoc = new XmlDocument();
		TextAsset mTextAsset = null;

		public bool readXmlFile (string xmlFileName)
		{
			try
			{
				mTextAsset = (TextAsset)Resources.Load(xmlFileName, typeof(TextAsset));
				if( mTextAsset != null )
				{
					xmlDoc.LoadXml(mTextAsset.text);
					return true;
				}
				return false;
			}
			catch ( Exception e )
			{
				Debug.Log (e.ToString());
				return false;
			}
		}
		 
		public bool readXmlString(String xmlString)
		{
			try
			{
				xmlDoc.LoadXml(xmlString);
				return true;
			}
			catch ( Exception e )
			{
				Debug.Log (e.ToString());
				return false;
			}
		}
		/*
		1. load Xml Document
       	2. get Domain
		*/
	}
}


